package cn.zhp.controller;

import cn.zhp.entity.Result;
import cn.zhp.service.SysOfficeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("manager/office")
public class SysOfficeController {

    @Autowired
    SysOfficeService service;


    @RequestMapping("list")
    public Result list() {
        return new Result(true, "查询成功", service.selectAll());
    }


    @RequestMapping("selectByRid")
    public Result selectByRid(long rid) {
        return new Result(true, "操作成功", service.selectByRid(rid));
    }
}
